/*
 * XML Type:  StatementRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.StatementRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML StatementRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class StatementRequestImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.StatementRequest
{
    
    public StatementRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKACCTFROM$0 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName INCTRAN$2 = 
        new javax.xml.namespace.QName("", "INCTRAN");
    
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Gets the "INCTRAN" element
     */
    public net.ofx.types.x2003.x04.IncTransaction getINCTRAN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.IncTransaction target = null;
            target = (net.ofx.types.x2003.x04.IncTransaction)get_store().find_element_user(INCTRAN$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "INCTRAN" element
     */
    public boolean isSetINCTRAN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INCTRAN$2) != 0;
        }
    }
    
    /**
     * Sets the "INCTRAN" element
     */
    public void setINCTRAN(net.ofx.types.x2003.x04.IncTransaction inctran)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.IncTransaction target = null;
            target = (net.ofx.types.x2003.x04.IncTransaction)get_store().find_element_user(INCTRAN$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.IncTransaction)get_store().add_element_user(INCTRAN$2);
            }
            target.set(inctran);
        }
    }
    
    /**
     * Appends and returns a new empty "INCTRAN" element
     */
    public net.ofx.types.x2003.x04.IncTransaction addNewINCTRAN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.IncTransaction target = null;
            target = (net.ofx.types.x2003.x04.IncTransaction)get_store().add_element_user(INCTRAN$2);
            return target;
        }
    }
    
    /**
     * Unsets the "INCTRAN" element
     */
    public void unsetINCTRAN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INCTRAN$2, 0);
        }
    }
}
